File descriptor
In Unix and Unix-like computer operating systems, a file descriptor (FD, less frequently fildes1) is a process-unique identifier (handle) for a file or other input/output resource, such as a pipe or network socket.
File descriptors typically have non-negative integer values, with negative values being reserved to indicate “no value” or error conditions.
File descriptors are a part of the POSIX API. Each Unix process (except perhaps daemons) should have three standard POSIX file descriptors, corresponding to the three standard streams:
Printed 2026-10-13.
(echo:: @ ᯤ)
Footnotes
-
The Open Group. “The Open Group Base Specifications Issue 8 IEEE Std 1003.1-2024”. Retrieved 2026-07-14. ↩